import { React } from 'react';
import { Route, IndexRedirect } from 'dva/router';
import { addRoute, addExtRoute, registerLayout } from '../framework/config/RouteHolder';
import { addMenu } from '../framework/config/MenuHolder';
import { addToolBar } from '../framework/config/ToolBarHolder';
import { addTabBar } from '../framework/config/TabBarHolder';


import PartTime from '../main/components/partTime/part-time-route';
import AllPartTime from '../main/components/allPartTime/all-part-time-route';

import Message from '../main/components/message/message-route';
import Personal from '../main/components/personal/personal-route';

// import JobList from '../main/components/pages/jobList/jobList-route';

import Consultation from '../main/components/pages/consultation/consultation-route';
import JobConsultList from '../main/components/pages/jobConsultList/JobConsultList-route';

import Search from '../main/components/pages/search/search-route';
import PartTimeDetail from '../main/components/pages/partTimeDetail/partTimeDetail-route';
import EnterpriseInformation from '../main/components/pages/enterpriseInformation/enterpriseInformation-route';
import MyPartTime from '../main/components/personal/pages/myPartTime/myPartTime-route';
import SimpleInfo from '../main/components/personal/pages/simpleInfo/simpleInfo-route';
import MyPartTimeDetail from '../main/components/personal/pages/myPartTime/myPartTimeDetail/myPartTimeDetail-route';
import MyCollection from '../main/components/personal/pages/myCollection/myCollection-route';
import MyFollow from '../main/components/personal/pages/myFollow/myFollow-route';
import MyWallet from '../main/components/personal/pages/myWallet/myWallet-route';
import SetMyWallet from '../main/components/personal/pages/setMyWallet/setMyWallet-route';
import MyPoint from '../main/components/personal/pages/myPoint/myPoint-route';
import MyResume from '../main/components/personal/pages/myResume/myResume-route';
import CheckRealName from '../main/components/personal/pages/checkRealName/checkRealName-route';
import PutPassword from '../main/components/personal/pages/putPassword/putPassword-route';
import SetWorkExperience from '../main/components/personal/pages/setWorkExperience/setWorkExperience-route';
import SetEducation from '../main/components/personal/pages/setEducation/setEducation-route';
import MyEducationList from '../main/components/personal/pages/myEducationList/myEducationList-route';
import TxMap from '../main/components/pages/txMap/txMap-route';
import ScreenPage from '../main/components/allPartTime/pages/screenPage/screenPage-route';
import CitySelect from '../main/components/pages/citySelect/citySelect-route';

import AddAppraise from '../main/components/personal/pages/addAppraise/addAppraise-route';

import MyAbout from '../main/components/personal/pages/myAbout/myAbout-route';
import MyFeedback from '../main/components/personal/pages/myFeedback/myFeedback-route';
import ContactService from '../main/components/personal/pages/contactService/contactService-route';
import LoginPassword from '../main/components/personal/pages/loginPassword/loginPassword-route';
import JobIntention from '../main/components/personal/pages/jobIntention/jobIntention-route';

import ProblemResponse from '../main/components/pages/problemResponse/problemResponse-route';
import PartTimeMessage from '../main/components/pages/partTimeMessage/partTimeMessage-route';
import Announce from '../main/components/pages/announce/announce-route';
import CategoryNavPartTime from '../main/components/pages/categoryNavPartTime/categoryNavPartTime-route';
import CommentPartTime from '../main/components/personal/pages/myPartTime/commentPartTime/commentPartTime-route';
import WithdrawCash from '../main/components/personal/pages/myWallet/withdrawCash/withdrawCash-route';


// import PartTimeTab from './components/personal/pages/partTimeTab/partTimeTab-route';

const partTime = require('../icons/footTabsIcon/part-time.svg');
const partTimeSelected = require('../icons/footTabsIcon/part-time-selected.svg');
const allPartTime = require('../icons/footTabsIcon/all-part-time.svg');
const allPartTimeSelected = require('../icons/footTabsIcon/all-part-time-selected.svg');
const message = require('../icons/footTabsIcon/message.svg');
const messageSelected = require('../icons/footTabsIcon/message-selected.svg');
const personal = require('../icons/footTabsIcon/personal.svg');
const personalSelected = require('../icons/footTabsIcon/personal-selected.svg');

module.exports = {

  init: function(app) {

    addRoute({
        path: '/part-time',
        name: '/part-time',
        component: PartTime,
        layout: true,
      },{
        path: '/all-part-time',
        name: '/all-part-time',
        component: AllPartTime,
        layout: true,
      },{
        path: '/message',
        name: '/message',
        component: Message,
        layout: true,
      },{
        path: '/personal',
        name: '/personal',
        component: Personal,
        layout: true,
      },{
        path: '/part-time-detail',
        name: '/part-time-detail',
        component: PartTimeDetail,
        layout: false,
      },{
        path: '/my-part-time',
        name: '/my-part-time',
        component: MyPartTime,
        layout: false,
      },{
        path: '/simple-info',
        name: '/simple-info',
        component: SimpleInfo,
        layout: false,
      },{
        path: '/my-part-time-detail',
        name: '/my-part-time-detail',
        component: MyPartTimeDetail,
        layout: false,
      },{
        path: '/my-collection',
        name: '/my-collection',
        component: MyCollection,
        layout: false,
      },{
        path: '/my-follow',
        name: '/my-follow',
        component: MyFollow,
        layout: false,
      },{
        path: '/my-wallet',
        name: '/my-wallet',
        component: MyWallet,
        layout: false,
      },{
        path: '/my-point',
        name: '/my-point',
        component: MyPoint,
        layout: false,
      },{
        path: '/enterprise-information',
        name: '/enterprise-information',
        component: EnterpriseInformation,
        layout: false,
      },{
        path: '/set-my-wallet',
        name: '/set-my-wallet',
        component: SetMyWallet,
        layout: false,
      },{
        path: '/put-password',
        name: '/put-password',
        component: PutPassword,
        layout: false,
      },{
        path: '/my-feedback',
        name: '/my-feedback',
        component: MyFeedback,
        layout: false,
      },{
        path: '/my-resume',
        name: '/my-resume',
        component: MyResume,
        layout: false,
      },{
        path: '/contact-service',
        name: '/contact-service',
        component: ContactService,
        layout: false,
      },{
        path: '/my-about',
        name: '/my-about',
        component: MyAbout,
        layout: false,
      },{
        path: '/login-password',
        name: '/login-password',
        component: LoginPassword,
        layout: false,
      },{
        path: '/check-real-name',
        name: '/check-real-name',
        component: CheckRealName,
        layout: false,
      },{
        path: '/job-intention',
        name: '/job-intention',
        component: JobIntention,
        layout: false,
      },{
        path: '/job-consult-list',
        name: '/job-consult-list',
        component: JobConsultList,
        layout: false,
      },{
        path: '/consultation',
        name: '/consultation',
        component: Consultation,
        layout: false,
      },{
        path: '/add-appraise',
        name: '/add-appraise',
        component: AddAppraise,
        layout: false,
      },{
        path: '/set-work-experience',
        name: '/set-work-experience',
        component: SetWorkExperience,
        layout: false,
      },{
        path: '/set-education',
        name: '/set-education',
        component: SetEducation,
        layout: false,
      },{
        path: '/my-education-list',
        name: '/my-education-list',
        component: MyEducationList,
        layout: false,
      },{
        path: '/search',
        name: '/search',
        component: Search,
        layout: false,
      },{
        path: '/tx-map',
        name: '/tx-map',
        component: TxMap,
        layout: false,
      },{
        path: '/screen-page',
        name: '/screen-page',
        component: ScreenPage,
        layout: false,
      },{
        path: '/problem-response',
        name: '/problem-response',
        component: ProblemResponse,
        layout: false,
      },{
        path: '/partTime-message',
        name: '/partTime-message',
        component: PartTimeMessage,
        layout: false,
      },{
        path: '/announce',
        name: '/announce',
        component: Announce,
        layout: false,
      },{
        path: '/category-nav-part-time',
        name: '/category-nav-part-time',
        component: CategoryNavPartTime,
        layout: false,
      },{
        path: '/city-select',
        name: '/city-select',
        component: CitySelect,
        layout: false,
      },{
        path: '/comment-part-time',
        name: '/comment-part-time',
        component: CommentPartTime,
        layout: false,
      },{
        path: '/withdraw-cash',
        name: '/withdraw-cash',
        component: WithdrawCash,
        layout: false,
      }

    );

    addTabBar({
        key: '/part-time',
        id: 'part-time',
        name: '兼职',
        icon: partTime,
        selectIcon: partTimeSelected,
        visible: false,
    },{
        key: '/all-part-time',
        id: 'all-part-time',
        name: '全部兼职',
        icon: allPartTime,
        selectIcon: allPartTimeSelected,
        visible: false,
    },{
        key: '/message',
        name: '消息',
        icon: message,
        selectIcon: messageSelected,
        visible: true,
    },{
        key: '/personal',
        name: '我的',
        icon: personal,
        selectIcon: personalSelected,
        visible: true,
    });
    app.model(require('./models/relations'));
    app.model(require('./components/partTime/part-time-model'));
    app.model(require('./components/allPartTime/all-part-time-model'));
    app.model(require('./components/message/message-model'));
    app.model(require('./components/personal/personal-model'));
    // app.model(require('./components/pages/jobList/jobList-model'));
    app.model(require('./components/pages/consultation/consultation-model'));
    app.model(require('./components/pages/jobConsultList/JobConsultList-model'));
    app.model(require('./components/pages/partTimeDetail/partTimeDetail-model'));
    app.model(require('./components/pages/enterpriseInformation/enterpriseInformation-model'));
    app.model(require('./components/personal/pages/myPartTime/myPartTime-model'));
    app.model(require('./components/personal/pages/simpleInfo/simpleInfo-model'));
    app.model(require('./components/personal/pages/myPartTime/myPartTimeDetail/myPartTimeDetail-model'));
    app.model(require('./components/personal/pages/myCollection/myCollection-model'));
    app.model(require('./components/personal/pages/myFollow/myFollow-model'));
    app.model(require('./components/personal/pages/myWallet/myWallet-model'));
    app.model(require('./components/personal/pages/setMyWallet/setMyWallet-model'));
    app.model(require('./components/personal/pages/loginPassword/loginPassword-model'));
    app.model(require('./components/personal/pages/jobIntention/jobIntention-model'));
    app.model(require('./components/personal/pages/setWorkExperience/setWorkExperience-model'));
    app.model(require('./components/personal/pages/setEducation/setEducation-model'));
    app.model(require('./components/personal/pages/myEducationList/myEducationList-model'));
    app.model(require('./components/pages/search/search-model'));

    app.model(require('./components/personal/pages/addAppraise/addAppraise-model'));

    app.model(require('./components/personal/pages/putPassword/putPassword-model'));
    app.model(require('./components/personal/pages/myAbout/myAbout-model'));
    app.model(require('./components/personal/pages/myFeedback/myFeedback-model'));
    app.model(require('./components/personal/pages/contactService/contactService-model'));
    app.model(require('./components/personal/pages/myResume/myResume-model'));
    app.model(require('./components/personal/pages/checkRealName/checkRealName-model'));
    app.model(require('./components/pages/txMap/txMap-model'));
    app.model(require('./components/allPartTime/pages/screenPage/screenPage-model'));
    app.model(require('./components/pages/problemResponse/problemResponse-model'));
    app.model(require('./components/pages/partTimeMessage/partTimeMessage-model'));
    app.model(require('./components/pages/announce/announce-model'));
    app.model(require('./components/pages/categoryNavPartTime/categoryNavPartTime-model'));
    app.model(require('./components/pages/citySelect/citySelect-model'));

    app.model(require('./components/personal/pages/myPoint/myPoint-model'));
    app.model(require('./components/personal/pages/myPartTime/commentPartTime/commentPartTime-model'));
    app.model(require('./components/personal/pages/myWallet/withdrawCash/withdrawCash-model'));
  }
}
